import React, { useState } from "react";
import Comp1 from "@/components/Comp1";
import Comp2 from "@/components/Comp2";

export default function ComponentCommunication() {
  let [message, setMessage] = useState("父组件的message");
  const handleMessage = (value) => {
    setMessage(value);
  };
  return (
    <div>
      <Comp1 message={message} onChangeMessage={handleMessage}></Comp1>
    </div>
  );
}
